/**
 * @author 兴趣使然黄小黄
 * @version 1.0
 * 测试队列
 */
public class Test {
    public static void main(String[] args) {
        ListQueue listQueue = new ListQueue();
        listQueue.offer(1);
        listQueue.offer(2);
        listQueue.offer(3);
        listQueue.offer(4);
        listQueue.offer(5);
        System.out.println("当前队头元素为: " + listQueue.peek());
        // 依次遍历
        System.out.println("依次出队: ");
        while (listQueue.size() != 0){
            System.out.print(listQueue.poll());
        }
    }
}
